package com.exer.basic.designpattern.principle.ocp;

public class AreaCal {
    public double calShapeArea(Shape shape) {
        return shape.calArea();
    }

    public static void main(String[] args) {
        AreaCal areaCal = new AreaCal();
        Circle shape = new Circle();
        shape.setRadius(2d);
        System.out.println("areaCal.calShapeArea(shape) = " + areaCal.calShapeArea(shape));
    }
}
